<include file="Inc/html_header" />
<div class="mtop10">
	<table class="table table-bordered table-hover">
        <thead>
            <tr>
                <th width="40">ID</th>
                <th>分类</th>
                <th width="60">状态</th>
                <th width="88">操作</th>
            </tr>
        </thead>
        <tbody>
            <?php
            if( ! empty($infos)){
                foreach($infos as $v){
                    $v['st'] = intval($v['st']);
                    $v['depth'] = intval($v['depth']);
            ?>
            <tr>
                <td class="tdf"><?php echo $v['id'];?></td>
                <td><?php echo str_repeat('&nbsp;', $v['depth']*6).'┣ '.$v['category_name'];?></td>
                <td><span class="c_p" onclick="categoryStatus(<?php echo $v['id'];?>, <?php echo (1-$v['st']);?>)"><?php if($v['st']===1){echo '<span class="color_1">正常</span>';}else{echo '<span class="color_0">禁用</span>';}?></span></td>
                <td>
                    <a href="<?php echo U('article/category_del', array('id'=>$v['id']));?>" onclick="javascript:return confirm('确定要删除吗？')">删除</a> /
                    <a href="<?php echo U('article/category_edit', array('id'=>$v['id']));?>">修改</a>
                </td>
            </tr>
            <?php }}else{?>
            <tr>
                <td colspan="4">没有数据</td>
            </tr>
            <?php }?>
        </tbody>
	</table>
</div>
<script type="text/javascript" src="/js/admin/article.js"></script>
<include file="Inc/html_footer" />